/**
 * Generate time : 2011-09-01 2:25:57
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cs.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCSEngineeringLog table comment : 工程施工纪录
 */
public class ZMCSEngineeringLog extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdEngineeringId = " "; /* 对应工程ID */
	private String fdDepartmentId = " "; /* 施工部门ID */
	private String fdDepartment = " "; /* 施工部门 */
	private String fdStatus = " "; /* 施工状态 */
	private String fdPlanBeginDate = " "; /* 计划开始日期 */
	private String fdPlanEndDate = " "; /* 计划结束日期 */
	private String fdBeginDate = " "; /* 开始日期 */
	private String fdEndDate = " "; /* 结束日期 */
	private Double fdData = new Double(0); /* 工程量 */
	private String fdUnit = " "; /* 计量单位 */
	private String fdRemarks = " "; /* 备注 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEngineeringId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("对应工程ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepartmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("施工部门ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepartment");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("施工部门");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStatus");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("施工状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPlanBeginDate");
		eiColumn.setFieldLength(14);
		eiColumn.setDescName("计划开始日期");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPlanEndDate");
		eiColumn.setFieldLength(14);
		eiColumn.setDescName("计划结束日期");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdBeginDate");
		eiColumn.setFieldLength(14);
		eiColumn.setDescName("开始日期");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEndDate");
		eiColumn.setFieldLength(14);
		eiColumn.setDescName("结束日期");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdData");
		eiColumn.setType("N");
		eiColumn.setScaleLength(4);
		eiColumn.setFieldLength(14);
		eiColumn.setDescName("工程量");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdUnit");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("计量单位");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRemarks");
		eiColumn.setFieldLength(500);
		eiColumn.setDescName("备注");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCSEngineeringLog() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdEngineeringId - 对应工程ID
	 * 
	 * @return the fdEngineeringId
	 */
	public String getFdEngineeringId() {
		return this.fdEngineeringId;
	}

	/**
	 * set the fdEngineeringId - 对应工程ID
	 */
	public void setFdEngineeringId(String fdEngineeringId) {
		this.fdEngineeringId = fdEngineeringId;
	}

	/**
	 * get the fdDepartmentId - 施工部门ID
	 * 
	 * @return the fdDepartmentId
	 */
	public String getFdDepartmentId() {
		return this.fdDepartmentId;
	}

	/**
	 * set the fdDepartmentId - 施工部门ID
	 */
	public void setFdDepartmentId(String fdDepartmentId) {
		this.fdDepartmentId = fdDepartmentId;
	}

	/**
	 * get the fdDepartment - 施工部门
	 * 
	 * @return the fdDepartment
	 */
	public String getFdDepartment() {
		return this.fdDepartment;
	}

	/**
	 * set the fdDepartment - 施工部门
	 */
	public void setFdDepartment(String fdDepartment) {
		this.fdDepartment = fdDepartment;
	}

	/**
	 * get the fdStatus - 施工状态
	 * 
	 * @return the fdStatus
	 */
	public String getFdStatus() {
		return this.fdStatus;
	}

	/**
	 * set the fdStatus - 施工状态
	 */
	public void setFdStatus(String fdStatus) {
		this.fdStatus = fdStatus;
	}

	/**
	 * get the fdPlanBeginDate - 计划开始日期
	 * 
	 * @return the fdPlanBeginDate
	 */
	public String getFdPlanBeginDate() {
		return this.fdPlanBeginDate;
	}

	/**
	 * set the fdPlanBeginDate - 计划开始日期
	 */
	public void setFdPlanBeginDate(String fdPlanBeginDate) {
		this.fdPlanBeginDate = fdPlanBeginDate;
	}

	/**
	 * get the fdPlanEndDate - 计划结束日期
	 * 
	 * @return the fdPlanEndDate
	 */
	public String getFdPlanEndDate() {
		return this.fdPlanEndDate;
	}

	/**
	 * set the fdPlanEndDate - 计划结束日期
	 */
	public void setFdPlanEndDate(String fdPlanEndDate) {
		this.fdPlanEndDate = fdPlanEndDate;
	}

	/**
	 * get the fdBeginDate - 开始日期
	 * 
	 * @return the fdBeginDate
	 */
	public String getFdBeginDate() {
		return this.fdBeginDate;
	}

	/**
	 * set the fdBeginDate - 开始日期
	 */
	public void setFdBeginDate(String fdBeginDate) {
		this.fdBeginDate = fdBeginDate;
	}

	/**
	 * get the fdEndDate - 结束日期
	 * 
	 * @return the fdEndDate
	 */
	public String getFdEndDate() {
		return this.fdEndDate;
	}

	/**
	 * set the fdEndDate - 结束日期
	 */
	public void setFdEndDate(String fdEndDate) {
		this.fdEndDate = fdEndDate;
	}

	/**
	 * get the fdData - 工程量
	 * 
	 * @return the fdData
	 */
	public Double getFdData() {
		return this.fdData;
	}

	/**
	 * set the fdData - 工程量
	 */
	public void setFdData(Double fdData) {
		this.fdData = fdData;
	}

	/**
	 * get the fdUnit - 计量单位
	 * 
	 * @return the fdUnit
	 */
	public String getFdUnit() {
		return this.fdUnit;
	}

	/**
	 * set the fdUnit - 计量单位
	 */
	public void setFdUnit(String fdUnit) {
		this.fdUnit = fdUnit;
	}

	/**
	 * get the fdRemarks - 备注
	 * 
	 * @return the fdRemarks
	 */
	public String getFdRemarks() {
		return this.fdRemarks;
	}

	/**
	 * set the fdRemarks - 备注
	 */
	public void setFdRemarks(String fdRemarks) {
		this.fdRemarks = fdRemarks;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdEngineeringId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEngineeringId")), fdEngineeringId));
		setFdDepartmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepartmentId")), fdDepartmentId));
		setFdDepartment(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepartment")), fdDepartment));
		setFdStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStatus")), fdStatus));
		setFdPlanBeginDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdPlanBeginDate")), fdPlanBeginDate));
		setFdPlanEndDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdPlanEndDate")), fdPlanEndDate));
		setFdBeginDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdBeginDate")), fdBeginDate));
		setFdEndDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEndDate")), fdEndDate));
		setFdData(NumberUtils.toDouble(StringUtils.toString(map.get("fdData")), fdData));
		setFdUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdUnit")), fdUnit));
		setFdRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemarks")), fdRemarks));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdEngineeringId", StringUtils.toString(fdEngineeringId, eiMetadata.getMeta("fdEngineeringId")));
		map.put("fdDepartmentId", StringUtils.toString(fdDepartmentId, eiMetadata.getMeta("fdDepartmentId")));
		map.put("fdDepartment", StringUtils.toString(fdDepartment, eiMetadata.getMeta("fdDepartment")));
		map.put("fdStatus", StringUtils.toString(fdStatus, eiMetadata.getMeta("fdStatus")));
		map.put("fdPlanBeginDate", StringUtils.toString(fdPlanBeginDate, eiMetadata.getMeta("fdPlanBeginDate")));
		map.put("fdPlanEndDate", StringUtils.toString(fdPlanEndDate, eiMetadata.getMeta("fdPlanEndDate")));
		map.put("fdBeginDate", StringUtils.toString(fdBeginDate, eiMetadata.getMeta("fdBeginDate")));
		map.put("fdEndDate", StringUtils.toString(fdEndDate, eiMetadata.getMeta("fdEndDate")));
		map.put("fdData", StringUtils.toString(fdData, eiMetadata.getMeta("fdData")));
		map.put("fdUnit", StringUtils.toString(fdUnit, eiMetadata.getMeta("fdUnit")));
		map.put("fdRemarks", StringUtils.toString(fdRemarks, eiMetadata.getMeta("fdRemarks")));

		return map;

	}
}